package com.atde._04_structural_design_patterns.bridge;


/**
 * @BelongsProject: hsp_java_design_mode
 * @BelongsPackage: com.atde._04_structural_design_patterns.bridge
 * @Author: Del
 * @CreateTime: 2025-06-20  00:17
 * @Description: 桥接模式 --- 手机抽象类
 * @Version: 1.0
 */
public abstract class Phone {

    // 聚合品牌
    private Brand brand;

    public Phone(Brand brand) {
        this.brand = brand;
    }

    public void setBrand(Brand brand) {
        this.brand = brand;
    }

    protected void open() {
        this.brand.open();
    }

    protected void close() {
        this.brand.close();
    }

    protected void call() {
        this.brand.call();
    }
}
